#! /bin/sh -vx
# $Id$
# Copyright 2017 Karl Berry <tex-live@tug.org>
# Copyright 2012 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_disdvi=$BinDir/disdvi$ExeExt

test_src=$srcdir/$DVI2TTY_TREE/test
test_out=$srcdir/output

rm -f *.dout
rc=0

$_disdvi $test_src/ligtest >ligtest.dout \
	&& diff $test_out/ligtest.dis ligtest.dout \
	|| rc=1

$_disdvi $test_src/ptex1.dvi >ptex1.dout \
	&& diff $test_out/ptex1.dis ptex1.dout || rc=2
$_disdvi $test_src/uptex1.dvi >uptex1.dout \
	&& diff $test_out/uptex1.dis uptex1.dout || rc=3
$_disdvi -p -Eu $test_src/ptex2.dvi >ptex2Eu.dout \
	&& diff $test_out/ptex2Eu.dis ptex2Eu.dout || rc=9
$_disdvi -u -Eu $test_src/uptex2.dvi >uptex2Eu.dout \
	&& diff $test_out/uptex2Eu.dis uptex2Eu.dout || rc=10


exit $rc
